package com.only4play.portal.cp.config;

import com.only4play.portal.common.bean.AccessToken;
import com.only4play.portal.common.util.http.apache.ApacheHttpClientBuilder;

import java.util.concurrent.locks.Lock;

public interface CpConfigStorage {
    void setBaseApiUrl(String baseUrl);

    String getApiUrl(String path);

    String getAccessToken();

    Lock getAccessTokenLock();

    boolean isAccessTokenExpired();

    void expireAccessToken();

    void updateAccessToken(AccessToken accessToken);

    void updateAccessToken(String accessToken, int expiresIn);

    boolean autoRefreshToken();

    String getCorpId();

    String getCorpSecret();

    Integer getAgentId();

    String getToken();

    String getAesKey();

    ApacheHttpClientBuilder getApacheHttpClientBuilder();

    String getHttpProxyHost();

    int getHttpProxyPort();

    String getHttpProxyUsername();

    String getHttpProxyPassword();
}
